import service from '@/utils/request'

export const useDictionaries_subsetApi = (id: number) => {
	return service.get('/nb/business/dictionaries_subset/findById', {
		params: {
			id: id
		}
	})
}

export const findByDictIdApi = (dataForm: any) => {
	return service.put('/nb/business/dictionaries_subset/findByDictId', dataForm)
}

export const findListByDictId = (dataForm: any) => {
	return service.get('/nb/business/dictionaries_subset/list', dataForm)
}

export const findByPcode = (code: string) => {
	return service.get('/nb/business/dictionaries_subset/' + code)
}

export const useDictionaries_subsetSubmitApi = (dataForm: any) => {
	if (dataForm.id) {
		return service.post('/nb/business/dictionaries_subset/edit', dataForm)
	} else {
		return service.post('/nb/business/dictionaries_subset/add', dataForm)
	}
}
